import { RouteRecordRaw } from "vue-router";
import Layout from '@/components/layout/index.vue';

const asyncRoutes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "home",
    component: Layout,
    redirect: "/dashboard",
    meta: {
      title: "登录"
    },
    children: [
      {
        path: "dashboard",
        name: "dashboard",
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: "仪表盘"
        }
      },
      {
        path: "user",
        name: "user",
        component: () => import("@/views/user/index.vue"),
        meta: {
          title: "用户"
        }
      }
    ]
  }
];

export default asyncRoutes;